//
// CNELU.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

import org.ryzom.nel.misc.CRGBA;

public class CNELU {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  public CNELU(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(CNELU obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nel3dJNI.delete_CNELU(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public static float getDefLx() {
    return nel3dJNI.CNELU_DefLx_get();
  }

  public static float getDefLy() {
    return nel3dJNI.CNELU_DefLy_get();
  }

  public static float getDefLzNear() {
    return nel3dJNI.CNELU_DefLzNear_get();
  }

  public static float getDefLzFar() {
    return nel3dJNI.CNELU_DefLzFar_get();
  }

  public static boolean initDriver(long w, long h, long bpp, boolean windowed, int systemWindow, boolean offscreen, boolean direct3d) {
    return nel3dJNI.CNELU_initDriver__SWIG_0(w, h, bpp, windowed, systemWindow, offscreen, direct3d);
  }

  public static boolean initDriver(long w, long h, long bpp, boolean windowed, int systemWindow, boolean offscreen) {
    return nel3dJNI.CNELU_initDriver__SWIG_1(w, h, bpp, windowed, systemWindow, offscreen);
  }

  public static boolean initDriver(long w, long h, long bpp, boolean windowed, int systemWindow) {
    return nel3dJNI.CNELU_initDriver__SWIG_2(w, h, bpp, windowed, systemWindow);
  }

  public static boolean initDriver(long w, long h, long bpp, boolean windowed) {
    return nel3dJNI.CNELU_initDriver__SWIG_3(w, h, bpp, windowed);
  }

  public static boolean initDriver(long w, long h, long bpp) {
    return nel3dJNI.CNELU_initDriver__SWIG_4(w, h, bpp);
  }

  public static boolean initDriver(long w, long h) {
    return nel3dJNI.CNELU_initDriver__SWIG_5(w, h);
  }

  public static void initScene(CViewport viewport) {
    nel3dJNI.CNELU_initScene__SWIG_0(CViewport.getCPtr(viewport), viewport);
  }

  public static void initScene() {
    nel3dJNI.CNELU_initScene__SWIG_1();
  }

  public static void initEventServer() {
    nel3dJNI.CNELU_initEventServer();
  }

  public static void releaseDriver() {
    nel3dJNI.CNELU_releaseDriver();
  }

  public static void releaseScene() {
    nel3dJNI.CNELU_releaseScene();
  }

  public static void releaseEventServer() {
    nel3dJNI.CNELU_releaseEventServer();
  }

  public static void screenshot() {
    nel3dJNI.CNELU_screenshot();
  }

  public static boolean init(long w, long h, CViewport viewport, long bpp, boolean windowed, int systemWindow, boolean offscreen, boolean direct3d) {
    return nel3dJNI.CNELU_init__SWIG_0(w, h, CViewport.getCPtr(viewport), viewport, bpp, windowed, systemWindow, offscreen, direct3d);
  }

  public static boolean init(long w, long h, CViewport viewport, long bpp, boolean windowed, int systemWindow, boolean offscreen) {
    return nel3dJNI.CNELU_init__SWIG_1(w, h, CViewport.getCPtr(viewport), viewport, bpp, windowed, systemWindow, offscreen);
  }

  public static boolean init(long w, long h, CViewport viewport, long bpp, boolean windowed, int systemWindow) {
    return nel3dJNI.CNELU_init__SWIG_2(w, h, CViewport.getCPtr(viewport), viewport, bpp, windowed, systemWindow);
  }

  public static boolean init(long w, long h, CViewport viewport, long bpp, boolean windowed) {
    return nel3dJNI.CNELU_init__SWIG_3(w, h, CViewport.getCPtr(viewport), viewport, bpp, windowed);
  }

  public static boolean init(long w, long h, CViewport viewport, long bpp) {
    return nel3dJNI.CNELU_init__SWIG_4(w, h, CViewport.getCPtr(viewport), viewport, bpp);
  }

  public static boolean init(long w, long h, CViewport viewport) {
    return nel3dJNI.CNELU_init__SWIG_5(w, h, CViewport.getCPtr(viewport), viewport);
  }

  public static boolean init(long w, long h) {
    return nel3dJNI.CNELU_init__SWIG_6(w, h);
  }

  public static void release() {
    nel3dJNI.CNELU_release();
  }

  public static void clearBuffers(CRGBA col) {
    nel3dJNI.CNELU_clearBuffers__SWIG_0(CRGBA.getCPtr(col), col);
  }

  public static void clearBuffers() {
    nel3dJNI.CNELU_clearBuffers__SWIG_1();
  }

  public static void swapBuffers() {
    nel3dJNI.CNELU_swapBuffers();
  }

  public static void setDriver(IDriver value) {
    nel3dJNI.CNELU_Driver_set(IDriver.getCPtr(value), value);
  }

  public static IDriver getDriver() {
    long cPtr = nel3dJNI.CNELU_Driver_get();
    return (cPtr == 0) ? null : new IDriver(cPtr, false);
  }

  public static void setScene(CScene value) {
    nel3dJNI.CNELU_Scene_set(CScene.getCPtr(value), value);
  }

  public static CScene getScene() {
    long cPtr = nel3dJNI.CNELU_Scene_get();
    return (cPtr == 0) ? null : new CScene(cPtr, false);
  }

  public static void setShapeBank(CShapeBank value) {
    nel3dJNI.CNELU_ShapeBank_set(CShapeBank.getCPtr(value), value);
  }

  public static CShapeBank getShapeBank() {
    long cPtr = nel3dJNI.CNELU_ShapeBank_get();
    return (cPtr == 0) ? null : new CShapeBank(cPtr, false);
  }

  public static void setMeshSkinManager(CVertexStreamManager value) {
    nel3dJNI.CNELU_MeshSkinManager_set(CVertexStreamManager.getCPtr(value), value);
  }

  public static CVertexStreamManager getMeshSkinManager() {
    long cPtr = nel3dJNI.CNELU_MeshSkinManager_get();
    return (cPtr == 0) ? null : new CVertexStreamManager(cPtr, false);
  }

  public static void setCamera(SWIGTYPE_p_CRefPtrT_NL3D__CCamera_t value) {
    nel3dJNI.CNELU_Camera_set(SWIGTYPE_p_CRefPtrT_NL3D__CCamera_t.getCPtr(value));
  }

  public static SWIGTYPE_p_CRefPtrT_NL3D__CCamera_t getCamera() {
    long cPtr = nel3dJNI.CNELU_Camera_get();
    return (cPtr == 0) ? null : new SWIGTYPE_p_CRefPtrT_NL3D__CCamera_t(cPtr, false);
  }

  public static void setEventServer(SWIGTYPE_p_NLMISC__CEventServer value) {
    nel3dJNI.CNELU_EventServer_set(SWIGTYPE_p_NLMISC__CEventServer.getCPtr(value));
  }

  public static SWIGTYPE_p_NLMISC__CEventServer getEventServer() {
    return new SWIGTYPE_p_NLMISC__CEventServer(nel3dJNI.CNELU_EventServer_get(), true);
  }

  public static void setAsyncListener(SWIGTYPE_p_NLMISC__CEventListenerAsync value) {
    nel3dJNI.CNELU_AsyncListener_set(SWIGTYPE_p_NLMISC__CEventListenerAsync.getCPtr(value));
  }

  public static SWIGTYPE_p_NLMISC__CEventListenerAsync getAsyncListener() {
    return new SWIGTYPE_p_NLMISC__CEventListenerAsync(nel3dJNI.CNELU_AsyncListener_get(), true);
  }

  public CNELU() {
    this(nel3dJNI.new_CNELU(), true);
  }

}
